package com.example.feifei.mvvm.view;

import android.databinding.ViewDataBinding;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.example.feifei.mvvm.model.UserInfoBean;
import com.example.feifei.mvvm.viewmodel.UserViewModel;

/**
 * Created by Administrator on 2018\9\23 0023.
 */

public class MvvmActivity extends AppCompatActivity{

    ViewDataBinding binding;
    UserViewModel viewModel;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        binding = DataBindingUtil.setContentView(MvvmActivity.this, R.layout.activity_mvvm);
//        viewModel = new UserViewModel(this,binding);

        UserInfoBean user = new UserInfoBean("测试用户名",2);
        user.setLogin("测试用户名进行");
        viewModel.setInfoBean(user);
    }

}
